package com.du;

import com.du.config.MainConfigLifeCycle;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author djg
 * @date 2020/11/23
 * @des
 */
public class IOCTestLifeCycle {

    @Test
    public void test01() {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfigLifeCycle.class);
        System.out.println("容器创建完成");

        //关闭容器,执行销毁方法
        applicationContext.close();

    }
}
